//
//  UIs_AttributedString_DemoVC.swift
//  APSwift
//
//  Created by jianbo.pei on 2023/10/11.
//

/**
 ## 参考链接：
 - [AttributedString —— 不仅仅让文字更漂亮](https://xiaozhuanlan.com/topic/7329860145)
 */

import UIKit

class UIs_AttributedString_DemoVC: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()

        let lb = UILabel().then { make in
            view.addSubview(make)
            make.textColor(.black)
//            make.numberOfLines(0)
            make.snp.makeConstraints { make in
                make.center.equalToSuperview()
            }
        }
        // Do any additional setup after loading the view.
        guard let attStr = try? AttributedString(markdown: "# Title\n**hello**\n") else { return }
        lb.attributedText = NSAttributedString(attStr)
        lb.numberOfLines = 0
    }


}
